﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Chapter04
{
    public class Code01
    {
        public static void Begin()
        {
            {
                bool isLessThan10;
                int myVal = 8;
                isLessThan10 = myVal < 10;
            }
            {
                bool isKarli;
                string myString = "Karli";
                isKarli = myString == "Karli";
            }
            {
                bool isTrue;
                bool myBool = false; ;
                isTrue = myBool == true;
            }
            {
                bool var1;
                int var2 = 6, var3 = 7;
                var1 = (var2 != 0) && (var3 / var2 > 2);
            }
        }

        public static void Ex01Begin()
        {
            Console.WriteLine("Enter an integer");
            int myInt = Convert.ToInt32(Console.ReadLine());
            bool isLessThan10 = myInt < 10;
            bool isBetween0And5 = (0 <= myInt) && (myInt <= 5);
            Console.WriteLine("Integer less 10? {0}", isLessThan10);
            Console.WriteLine("Integer between 0 and 5? {0}", isBetween0And5);
            Console.WriteLine("Exactly one of the above is true? {0}", isLessThan10 ^ isBetween0And5);
            Console.ReadLine();
        }
    }
}
